<template>
	<section>
		<div class="reBusiness-in-contain">			
			<ul class="bg-white fs28rem">
				<li class="pt30rem pb30rem pl30rem pr30rem border-b layout flex-left">
					<label>公司名称：</label>
					<input type="text" placeholder="请输入您的公司名称" v-model="form.company_name">
				</li>
				<li class="pt30rem pb30rem pl30rem pr30rem border-b layout flex-left" >
					<label>商标名称：</label>
					<input type="text" placeholder="请输入您收到的商标名称" v-model="form.shangbiao_name"> 
				</li>
				<li class="pt30rem pb30rem pl30rem pr30rem border-b layout flex-left">
					<label>联系人：</label>
					<input type="text" placeholder="请输入您的联系人" v-model="form.contacts">
				</li>
				<li class="pt30rem pb30rem pl30rem pr30rem border-b layout flex-left">
					<label>电话号码：</label>
					<input type="text" placeholder="请输入您手机号" v-model="form.mobile">
				</li>
				<li class="pt30rem pb30rem pl30rem pr30rem">
					<label class="mb30rem">其他说明：</label>
					<textarea class="others-textarea mb30rem" rows="10" v-model="form.remark"></textarea>
					<router-link to="/member/reBusinessIn/AwardInfo">
						<small class="cxo-red-color">《推荐有奖说明》</small>
					</router-link>
				</li>				
			</ul>			
			<button @click="submit" class="mt20rem mr30rem ml30rem mb20rem btn cxo-red radius align-center fs30rem white block circle-8" style="width:92%; margin-top:20%;">
					提交资料
			</button>				
			<!-- <router-view></router-view>	 -->
		</div>
	</section>
</template>

<script>	
	import { reStoreEntry } from "@/api/store";
	import $toast from "@/utils/toast";

	export default{	    
		data()
		{
		    return{
		    	form:{
					uid            : localStorage.getItem('uid'),
					contacts       : '',
					company_name   : '',
					shangbiao_name : '',
					mobile         : '',
					remark         : ''
		    	},
		    	phone   : window.localStorage.getItem('mobile')

            }
		},
		created()
		{
			if(!this.phone){
				this.$router.replace('/login/banding?redirect=' + this.$router.currentRoute.fullPath)
			}
		},
		methods:
		{
			submit()
			{
				reStoreEntry(this.form).then( res => {
					if(res.msg == "OK")
					{
						$toast("提交资料成功");
					 	this.$route.replace('/member');
					}					 
				})
			}
		}
	}
</script>

<style lang="less">
	.reBusiness-in-contain{
		min-height: 1334/28rem;
		label{
			display: block;
			width: 170/28rem;
		}
		input{ 
			width: 350/28rem;
			border: 1px solid transparent;
		}
		.others-textarea{
			display: block;
			width: 100%;
			background-color: #f5f5f5;
			border:transparent;
			resize: none;
		}		
	}
</style>

